﻿cmake_minimum_required(VERSION 2.8)
project(qsqlmysql)
set(CMAKE_AUTOMOC ON)
file(GLOB srcs *.cpp)
file(GLOB hdrs *.h)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
find_package(mysql)
find_package(Qt5 REQUIRED COMPONENTS Core Sql)
include_directories(${MYSQL_INCLUDE_DIR} ${Qt5Sql_PRIVATE_INCLUDE_DIRS})
add_library(${PROJECT_NAME} SHARED ${srcs} ${hdrs})
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Sql)
